@extends('layouts.header')
@section('title','修改')
@section('content')
    <body>
    <article class="page-container">
        <form class="form form-horizontal" id="myform" autocomplete="off">
            <div class="row cl">
                <label class="form-label col-sm-3">城市：</label>
                <div class="formControls col-sm-9">
                    <input type="text" class="input-text" value="{{ $info->name }}" placeholder="" id="name" name="name required" autofocus="autofocus">
                </div>
            </div>

            <div class="row cl">
                <label class="form-label col-sm-3">编码：</label>
                <div class="formControls col-sm-9">
                    <input type="number" class="input-text required" value="{{ $info->code }}" placeholder="" id="code" name="code" autofocus="autofocus" max="99" min="1">
                </div>
            </div>
            @csrf
            <div class="row cl pt-20">
                <div class="col-sm-9 col-sm-offset-3">
                    <a class="btn btn-primary radius" id="sub">&nbsp;&nbsp;提交&nbsp;&nbsp;</a>
                    <input class="btn btn-danger radius ml-15" type="button" value="&nbsp;&nbsp;关闭&nbsp;&nbsp;" onclick="layer_close();">
                </div>
            </div>
        </form>
    </article>
    <script type="text/javascript">
        $(function () {
            $('.skin-minimal input').iCheck({
                checkboxClass: 'icheckbox-blue',
                radioClass: 'iradio-blue',
                increaseArea: '20%'
            });

            $('#sub').on('click',function () {
                if ($('#myform').valid()) {
                    ajax('post','edit','myform','formSubBak');
                    function formSubBak() {
                         parent.table_reload(0);
                    }
                }
            })
        });
    </script>
    <!--/请在上方写此页面业务相关的脚本-->
@endsection